Developers do their best to be able to design sites and applications that different users can use in the best possible way and ultimately gain a positive user experience, for programming , there are various languages, including JavaScript, which is very popular among programmers and many of them use this language to do their work, for instance, with the help of it, you can enter a command in which all the first column is multiplied by the second column, and by entering this command only once, all tasks will be done, we are going to explain this part later, but before that we need to give a brief explanation of JavaScript.
What is JavaScript?
It is known as JS, and it is very popular among programmers which can be used for server-side programming, mobile applications , games and desktop applications, and allows users to have a better user experience while using any program which is written with this language, these days, almost all browsers support this language, but if they are disabled, the content or functionality of the web page may be limited or unavailable.In other words, if a website does not use this language despite the importance it has, users will not be willing to use that site in order to meet their daily needs, and it is necessary to use this language in order to create better interaction with users, so that you have to get help from it in order to create a dynamic page which is able to attract lots of users’ attention day by day.
JavaScript Function Definitions:
The function keyword is used to describe the various functions that exist in JS and can be called in different ways, which we are going to discuss below.
In general, functions in JavaScript have two main types, which are as follows:
- function declaration- function expression
Function declaration:
These functions are not executed immediately, in fact, they are stored for later use, so that you can use them whenever you want, as you know, in JavaScript, semicolons are used to separate executable expressions, here consider the following example:
<! DOCTYPE html>
<html>
<body>
<h2> JavaScript Functions </h2>
<p> This example calls a function which performs a calculation and returns the result: </p>
<p id = "demo"> </p>
<script>
var x = myFunction (4, 3);
document.getElementById ("demo"). innerHTML = x;
function myFunction (a, b) {
return a * b;
}
</script>
</body>
</html>
Read more on:https://www.dotnek.com/Blog/Web/what-are-function-definitions-and-function-pa
link:https://dotnek.mystrikingly.com/
Related link:DotNek app programming
:: برچسبها:
dotnek ,
seo ,
site ,
:: بازدید از این مطلب : 48
|
امتیاز مطلب : 0
|
تعداد امتیازدهندگان : 0
|
مجموع امتیاز : 0